﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.redshift
{
	// Token: 0x020000FE RID: 254
	public class TFetchFromStmt : TCustomSqlStatement
	{
		// Token: 0x17000171 RID: 369
		// (get) Token: 0x0600085E RID: 2142 RVA: 0x00301ED5 File Offset: 0x003000D5
		// (set) Token: 0x0600085F RID: 2143 RVA: 0x00301EDD File Offset: 0x003000DD
		public virtual TObjectName CursorName
		{
			get
			{
				return this.cursorName;
			}
			set
			{
				this.cursorName = value;
			}
		}

		// Token: 0x06000860 RID: 2144 RVA: 0x00301EE6 File Offset: 0x003000E6
		public TFetchFromStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstFetchFrom;
		}

		// Token: 0x06000861 RID: 2145 RVA: 0x00301EF8 File Offset: 0x003000F8
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TFetchSqlNode tfetchSqlNode = (TFetchSqlNode)this.rootNode;
			this.cursorName = tfetchSqlNode.CursorName;
			return 0;
		}

		// Token: 0x06000862 RID: 2146 RVA: 0x00301F30 File Offset: 0x00300130
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000863 RID: 2147 RVA: 0x00301F40 File Offset: 0x00300140
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001211 RID: 4625
		private TObjectName cursorName;
	}
}
